
#ifndef SX_OPENGL_STORED_MESH_RENDERER_H
#define SX_OPENGL_STORED_MESH_RENDERER_H

#include <sxGraphicsObjectRenderer.h>
#include <sxMesh.h>
#include <sxOpenGL_Context.h>
#include <sxStoredPhysicalRepresentation.h>

/* Sx library types. */
using Sx::Graphics::Objects::Mesh;
using Sx::Graphics::Objects::Rendering::GraphicsObjectRenderer;
using Sx::Physics::StoredPhysicalRepresentation;
using Sx::OpenGL::Graphics::Contexts::OpenGL_Context;

namespace Sx {
namespace OpenGL {
namespace Graphics {
namespace Objects {
namespace Rendering {

class OpenGL_Stored_MeshRenderer : public GraphicsObjectRenderer<OpenGL_Context, Mesh, StoredPhysicalRepresentation> {
public:
	OpenGL_Stored_MeshRenderer(const std::shared_ptr<OpenGL_Context>& graphicsContext);
	virtual ~OpenGL_Stored_MeshRenderer();

	bool construct(OpenGL_Context* const graphicsContext, Mesh* const mesh, StoredPhysicalRepresentation* const physicalRepresentation);
	void update(OpenGL_Context* const graphicsContext, Mesh* const mesh, float dt);
	void render(OpenGL_Context* const graphicsContext, Mesh* const mesh, StoredPhysicalRepresentation* const physicalRepresentation);
};

}

}

}

}

}

#endif
